<?php $request = sfContext::getInstance()->getRequest(); ?>
<div id="show-wraper" title="<?php echo __('Record preview'); ?>">
  <?php foreach ($fields as $field) if($field['allow_show'] == true): ?>
    <div class="show-field">
      <div class="show-field-label">
        <?php echo $field['Translation'][$request->getParameter('sf_culture')]['name']; ?>
      </div>
      <div class="show-field-value">
        <?php if($field['cmsFieldType']['name'] == 'media'): include_partial('field/media', array('field'=>$field, 'request'=>$request)); ?>
        <?php else: echo html_entity_decode($field['value']);?>
        <?php endif; ?>
      </div>
    </div>
  <?php endif; ?>
  <br />
  <hr />
  <?php echo link_to( __('Edit'), array('table' => $request->getParameter('table'),'action' => 'edit', 'id' => $fields['id']['value']), array('class'=>'button')); ?>
  <?php echo link_to( __('Delete'), array('table' => $request->getParameter('table'),'action' => 'delete', 'id' => $fields['id']['value']), array('class'=>'button', 'method' => 'delete', 'confirm' => __('Are you sure?'))); ?>
  <script type="text/javascript">
    $("#show-wraper").dialog({width:'auto',height:'auto', resizable: false}); 
    $(".button").button();
    initLytebox();
  </script>
</div>